/*******************************************************************
 * Copyright (c) 2013 珠海比特讯科技有限公司. All rights reserved.
 * （1）软件的版权将受到法律保护，不允许非经授权的使用；
 * （2）未经版权所有人授权，任何人不得修改、复制和传播软件源代码、图片及其它资源等；
 * （3）未经版权所有人授权，不允许对软件进行修改；
 * （4）未经版权所有人授权，不允许在该软件的基础上开发新的软件；
 * （5）珠海比特讯科技有限公司拥有最终解释权
 *******************************************************************/
package youxiao.bytezon.views.course_details;

import java.time.LocalDate;
import java.time.LocalTime;
import java.util.Set;

import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonInclude.Include;

import youxiao.bytezon.enums.AttendanceState;
import youxiao.bytezon.models.CourseDetail;
import youxiao.bytezon.utils.BeanUtil;
import youxiao.bytezon.views.courses.CourseView;
import youxiao.bytezon.views.rooms.RoomView;

public class CourseDetailView {

	private Long id;
	private LocalDate courseDate;
	private LocalTime starttime;
	private LocalTime endtime;
	private String remark;
	private Integer applylearnCount;
	private Integer trialCount;
	private AttendanceState attendanceState;
	@JsonInclude(Include.NON_NULL)
	private RoomView room;
	@JsonInclude(Include.NON_NULL)
	private Set<StudentCourseDetailView> studentCourseDetails;
	@JsonInclude(Include.NON_NULL)
	private Set<String> studentNames;
	@JsonInclude(Include.NON_NULL)
	private CourseView course;

	public CourseDetailView() {}
	
	public CourseDetailView(CourseDetail courseDetail) {
		BeanUtil.copyTableProps(courseDetail, this);

		this.room = new RoomView();
		BeanUtil.copyTableProps(courseDetail.getRoom(), this.room, "id");
	}

	public Long getId() {
		return id;
	}

	public void setId(Long id) {
		this.id = id;
	}

	public LocalDate getCourseDate() {
		return courseDate;
	}

	public void setCourseDate(LocalDate courseDate) {
		this.courseDate = courseDate;
	}

	public LocalTime getStarttime() {
		return starttime;
	}

	public void setStarttime(LocalTime starttime) {
		this.starttime = starttime;
	}

	public LocalTime getEndtime() {
		return endtime;
	}

	public void setEndtime(LocalTime endtime) {
		this.endtime = endtime;
	}

	public String getRemark() {
		return remark;
	}

	public void setRemark(String remark) {
		this.remark = remark;
	}

	public RoomView getRoom() {
		return room;
	}

	public void setRoom(RoomView room) {
		this.room = room;
	}

	public Integer getApplylearnCount() {
		return applylearnCount;
	}

	public void setApplylearnCount(Integer applylearnCount) {
		this.applylearnCount = applylearnCount;
	}

	public Integer getTrialCount() {
		return trialCount;
	}

	public void setTrialCount(Integer trialCount) {
		this.trialCount = trialCount;
	}

	public AttendanceState getAttendanceState() {
		return attendanceState;
	}

	public void setAttendanceState(AttendanceState attendanceState) {
		this.attendanceState = attendanceState;
	}

	public Set<StudentCourseDetailView> getStudentCourseDetails() {
		return studentCourseDetails;
	}

	public void setStudentCourseDetails(Set<StudentCourseDetailView> studentCourseDetails) {
		this.studentCourseDetails = studentCourseDetails;
	}

	public CourseView getCourse() {
		return course;
	}

	public void setCourse(CourseView course) {
		this.course = course;
	}

	public Set<String> getStudentNames() {
		return studentNames;
	}

	public void setStudentNames(Set<String> studentNames) {
		this.studentNames = studentNames;
	}

}
